<include file="public/layout" />

<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default;">
	<div class="page">
		<div class="fixed-bar">
			<div class="item-title">
				<div class="subject">
					<h3>窖藏直播管理</h3>
					<h5>直播添加与管理</h5>
				</div>
			</div>
		</div>
		<div id="explanation" class="explanation">
			<div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
				<h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
				<span title="收起提示" id="explanationZoom"></span>
			</div>
			<ul>
				<li>温馨提示：顶级分类（一级大类）设为推荐时才会在首页楼层中显示</li>
				<li>最多只能分类到三级</li>
			</ul>
		</div>
		<form method="post">
			<input type="hidden" value="ok" name="form_submit">
			<div class="flexigrid">
				<div class="mDiv">
					<div class="ftitle">
						<h3>所有窖藏直播列表</h3>
						<h5></h5>
					</div>
				</div>
				<div class="hDiv">
					<div class="hDivBox">
						<table cellspacing="0" cellpadding="0">
							<thead>
								<tr>
									<th align="center" axis="col0" class="sign">
										<div style="text-align: center; width: 24px;"><i class="ico-check"></i></div>
									</th>
									<th align="center" axis="col2">
										<div style="text-align: center; width: 200px;">直播预告名称</div>
									</th>
									<th align="center" axis="col3">
										<div style="text-align: center; width: 270px;">活动时间</div>
									</th>
									<th align="center" axis="col4">
										<div style="text-align: center; width: 140px;">浏览人数</div>
									</th>
									<th align="center" axis="col6">
										<div style="text-align: center; width: 150px;">发布时间</div>
									</th>
									<th align="center" axis="col1" class="handle">
										<div style="text-align: center; width: 150px;">操作</div>
									</th>
									<th axis="col10">
										<div></div>
									</th>
								</tr>
							</thead>
						</table>
					</div>
				</div>
				<div class="tDiv">
					<div class="tDiv2">
						<a href="{:U('Cellar/addeditShow')}">
							<div class="fbutton">
								<div title="新增直播预告" class="add">
									<span><i class="fa fa-plus"></i>新增直播预告</span>
								</div>
							</div>
						</a>
					</div>
					<div style="clear:both"></div>
				</div>
				<div style="height: auto;" class="bDiv">
					<table cellspacing="0" cellpadding="0" border="0" id="article_cat_table" class="flex-table autoht">
						<tbody id="treet1">
							<foreach name="liveshows" item="vo" key="k">
							<tr>
								<td class="sign">
									<div style="text-align: center; width: 24px;">
										<i class="ico-check"></i>
									</div>
								</td>
								<td class="sort">
									<div style="text-align: center; width: 200px;">{$vo.title}</div>
								</td>
								<td class="name">
									<div style="text-align: center; width: 270px;">{$vo.livetime|date="Y-m-d H:i:s",###}</div>
								</td>
								<td class="name">
									<div style="text-align: center; width: 140px;"><if empty($vo.visitors)>0<else>{$vo.visitors}</else></if></div>
								</td>
								<td align="center" class="">
									<div style="text-align: center; width: 150px;">{$vo.addtime|date="Y-m-d H:i:s",###}</div>
								</td>
								<td class="handle">
									<div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
										<span class="btn"><em><i class="fa fa-cog"></i>操作<i class="arrow"></i></em>
                  							<ul>
                    							<li><a href="{:U('Cellar/addeditShow',array('id'=>$vo.id))}">编辑直播信息</a></li>
                    							<li><a href="javascript:del('{:U('Cellar/delShow',array('id'=>$vo.id))}');">删除直播</a></li>
                    							<li><a href="javascript:0" target="_blank">浏览直播预告页面</a></li>
                  							</ul>
                  						</span>
									</div>
								</td>
								<td style="width: 100%;">
									<div>&nbsp;</div>
								</td>
							</tr>
							</foreach>
						</tbody>
					</table>
				</div>
				{$pager}
			</div>
	</div>
	<script>
		$(document).ready(function() {
			 // 点击分页触发的事件
	          $(".pagination  a").click(function(){
	              cur_page = $(this).data('p');
	              location.href = "/admin/cellar/liveShow/p/"+cur_page;
	          });
			// 表格行点击选中切换
			$('.bDiv > table>tbody >tr').click(function() {
				$(this).toggleClass('trSelected');
			});
		});

		// 点击展开 收缩节点
		function treeClicked(obj, cat_id, parent_id_path) {

			var src = $(obj).attr('src');
			if(src == '/public/static/images/tv-expandable.gif') {
				$(".parent_id_" + cat_id).show();
				$(obj).attr('src', '/public/static/images/tv-collapsable-last.gif');
			} else {
				$("tr[parent_id_path^='" + parent_id_path + "_']").hide().find('img').attr('src', '/public/static/images/tv-expandable.gif');
				$(obj).attr('src', '/public/static/images/tv-expandable.gif');

			}
		}
	</script>
</body>

</html>